class PoliceDog(object):
    @staticmethod
    def pd_work():
        print('police dog is attacking enemy')


class GuideDog(object):
    @staticmethod
    def gd_work():
        print('guide dog is guiding')


class DrugDetectionDog(object):
    @staticmethod
    def ddd_work():
        print('drug detection dog is working')


class Person(object):
    def __init__(self, name):
        self.name = name

    def work_with_pd(self):
        self.dog.pd_work()

    def work_with_gd(self):
        self.dog.gd_work()

    def work_with_ddd(self):
        self.dog.ddd_work()


p = Person('tom')
pd = PoliceDog()
gd = GuideDog()
ddd = DrugDetectionDog()
p.dog = pd
p.work_with_pd()
p.dog = gd
p.work_with_gd()
p.dog = ddd
p.work_with_ddd()
